package Controller;
import Model.*;
import java.util.*;

public class OrderCtr
{
    
    public OrderCtr()
    {
        OrderCont.getInstance();
    }


    public static void AddOrder(Order o)
    {
        OrderCont.getInstance().addOrder(o);
    }
    
    public static void DeleteOrder(long theorderID)
    {
        for(int i=0;i<OrderCont.getCont().size();i++)
        {
            if(OrderCont.getCont().get(i).getOrderID()==theorderID)OrderCont.getCont().remove(i);
        }
    }

    public static void SearchOrder(long theorderID)
    {
        for(int i=0;i<OrderCont.getCont().size();i++)
        {
            if(OrderCont.getCont().get(i).getOrderID()==theorderID)System.out.println("Order exists");
            else System.out.println("Order doesn`t exist");
        }
    }
    
}
